.mobile-nav {
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  overflow: hidden;
  height: 60px; /* 修改关闭搜索框时导航栏高度 */
  transition: height 0.3s ease;
}

.mobile-nav.search-open {
  height: 120px; /* 展开后的高度，根据实际调整 */
}

.mobile-nav input {
  border: 2px solid #007bff;
  border-radius: 25px;
  padding: 0.8rem;
  width: 80%; /* 使用百分比宽度，根据导航栏自适应 */
  margin: 10px auto;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-nav.search-open input {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav ul li a {
  text-decoration: none;
  color: #333333;
  transition: color 0.3s ease;
}

.mobile-nav ul li a:hover {
  color: #007bff;
}

.mobile-nav ul li button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: #333333;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.mobile-nav ul li button:hover {
  color: #007bff;
}